package com.ruoyi.car.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.car.mapper.CarMaintenanceRecordTempMapper;
import com.ruoyi.car.domain.CarMaintenanceRecordTemp;
import com.ruoyi.car.service.ICarMaintenanceRecordTempService;

/**
 * 维修保养记录中间Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-03
 */
@Service
public class CarMaintenanceRecordTempServiceImpl implements ICarMaintenanceRecordTempService 
{
    @Autowired
    private CarMaintenanceRecordTempMapper carMaintenanceRecordTempMapper;

    /**
     * 查询维修保养记录中间
     * 
     * @param tempId 维修保养记录中间主键
     * @return 维修保养记录中间
     */
    @Override
    public CarMaintenanceRecordTemp selectCarMaintenanceRecordTempByTempId(Long tempId)
    {
        return carMaintenanceRecordTempMapper.selectCarMaintenanceRecordTempByTempId(tempId);
    }

    /**
     * 查询维修保养记录中间列表
     * 
     * @param carMaintenanceRecordTemp 维修保养记录中间
     * @return 维修保养记录中间
     */
    @Override
    public List<CarMaintenanceRecordTemp> selectCarMaintenanceRecordTempList(CarMaintenanceRecordTemp carMaintenanceRecordTemp)
    {
        return carMaintenanceRecordTempMapper.selectCarMaintenanceRecordTempList(carMaintenanceRecordTemp);
    }

    /**
     * 新增维修保养记录中间
     * 
     * @param carMaintenanceRecordTemp 维修保养记录中间
     * @return 结果
     */
    @Override
    public int insertCarMaintenanceRecordTemp(CarMaintenanceRecordTemp carMaintenanceRecordTemp)
    {
        //carMaintenanceRecordTemp.setCreateTime(DateUtils.getNowDate());
        return carMaintenanceRecordTempMapper.insertCarMaintenanceRecordTemp(carMaintenanceRecordTemp);
    }

    /**
     * 修改维修保养记录中间
     * 
     * @param carMaintenanceRecordTemp 维修保养记录中间
     * @return 结果
     */
    @Override
    public int updateCarMaintenanceRecordTemp(CarMaintenanceRecordTemp carMaintenanceRecordTemp)
    {
        //carMaintenanceRecordTemp.setUpdateTime(DateUtils.getNowDate());
        return carMaintenanceRecordTempMapper.updateCarMaintenanceRecordTemp(carMaintenanceRecordTemp);
    }

    /**
     * 批量删除维修保养记录中间
     * 
     * @param tempIds 需要删除的维修保养记录中间主键
     * @return 结果
     */
    @Override
    public int deleteCarMaintenanceRecordTempByTempIds(Long[] tempIds)
    {
        return carMaintenanceRecordTempMapper.deleteCarMaintenanceRecordTempByTempIds(tempIds);
    }

    /**
     * 删除维修保养记录中间信息
     * 
     * @param tempId 维修保养记录中间主键
     * @return 结果
     */
    @Override
    public int deleteCarMaintenanceRecordTempByTempId(Long tempId)
    {
        return carMaintenanceRecordTempMapper.deleteCarMaintenanceRecordTempByTempId(tempId);
    }

    @Override
    public int batchInsertCarMaintenanceRecordTemp(List<CarMaintenanceRecordTemp> carMaintenanceRecordTemps) {
        return carMaintenanceRecordTempMapper.batchInsertCarMaintenanceRecordTemp(carMaintenanceRecordTemps);
    }

    @Override
    public int deleteCarMaintenanceRecordTempMaintenanceRecordId(Long maintenanceRecordId) {
        return carMaintenanceRecordTempMapper.deleteCarMaintenanceRecordTempByMaintenanceRecordId(maintenanceRecordId);
    }

    @Override
    public int updateCarMaintenanceRecordTempByRecordId(CarMaintenanceRecordTemp carMaintenanceRecordTemp) {
        return carMaintenanceRecordTempMapper.updateCarMaintenanceRecordTempByRecordId(carMaintenanceRecordTemp);
    }
}
